<template>
  <Designer :users="users" :groups="groups" @onSave="onSave" :diagramXML="diagramXML"/>
</template>
<script>
import Designer from '../package/'

export default {
  name: 'App',
  components: {
    Designer
  },
  data() {
    return {
      users: [{
        name: 'zhangsan',
        value: '1'
      }, {
        name: 'lisi',
        value: '2'
      }, {
        name: 'wangwu',
        value: '3'
      }],
      groups: [{
        name: '普通组',
        value: '1'
      }, {
        name: '特殊组',
        value: '2'
      }],
      diagramXML: ``
    }
  },
  methods: {
    onSave(xml) {
      console.log(xml);
    }
  }
}
</script>
